home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d1 / eddtv4.arc / EDDTV400.DOC < prev    next >
Text File  |  1988-03-28  |  15KB  |  282 lines

  1.                 Extended Drive Description Tables for the IBM AT
  2.  
  3.           When the IBM/PC was introduced,  there  was  no  fixed  disk
  4.           option  available  from  IBM.  Several  third  party vendors
  5.           produced add-on fixed drives, but there were no standards as
  6.           far as addressing,  interrupts used,  etc.  This led to much
  7.           confusion.  The  situation  got a little better when the IBM
  8.           PC/XT  was  introduced.   A  set  of   standards   on   BIOS
  9.           interfacing, interrupts used, addressing, etc.  was set. The
  10.           fixed disk description was stored in  the  fixed  disk  BIOS
  11.           contained on the fixed disk controller card.  There was not,
  12.           however a standard set of disk description  tables  defined.
  13.           Each  controller  BIOS  had  it's  own  set of tables.  Some
  14.           vendors OEM'd controllers and burned their own  eproms  with
  15.           undocumented  table  entries.  This has caused many problems
  16.           when adding or replacing a fixed drive.
  17.  
  18.           Next came the IBM AT.  The AT BIOS contained support  for  a
  19.           fixed  disk  in  the  standard  BIOS.  A  setup  program was
  20.           supplied that  stored  the  hard  drive  type  in  the  CMOS
  21.           configuration  ram.  When  the machine was booted,  the BIOS
  22.           would read the drive type from cmos and use this as an index
  23.           into a table of drive descriptions.  This made  life  easier
  24.           when  adding a hard drive...or did it?  IBM supplied only 14
  25.           drive types in the original BIOS. When the newer AT 339 came
  26.           out the number of drive types was expanded to 47,  but  only
  27.           22  entries  were  usable,  with  the  other  entries marked
  28.           reserved and filled in with zeros.  Again your options  were
  29.           limited.
  30.  
  31.           With  the  falling prices of fixed drives,  their popularity
  32.           increased,  and everyone wanted to add one or more to  their
  33.           system.   Many   users   found  the  32mb  size  restriction
  34.           unacceptable and wanted to attach very large drives to their
  35.           systems,  but no drive type was supplied in the BIOS and DOS
  36.           did not support them.
  37.  
  38.           The  most  popular  solution to the problem of limited drive
  39.           types is through software. Device drivers are loaded at boot
  40.           time and redefine the fixed drives.  This solution has  been
  41.           very effective, but has some problems. You must boot off the
  42.           fixed drive or have the driver on any floppy use for booting
  43.           to  properly access the fixed drive.  Some operating systems
  44.           other than DOS may not be supported by the device driver.
  45.  
  46.           Another option is by placing code in to eproms and using the
  47.           two extra sockets on the system  board  to  contain  a  BIOS
  48.           extension  that defines the fixed drives during the power on
  49.           self test (POST) sequence. This should remove the dependence
  50.           on software drivers for defining drive tables.
  51.  
  52.           I chose the BIOS extension option as the preferred  solution
  53.           in  my case and began looking at some commercially available
  54.           products.  All were found to  be  unacceptable  for  various
  55.           reasons.  One vendor required I purchase two sets minimum. I
  56.           thought that was ridiculous,  I only had one  machine!  Some
  57.           were  priced much too high for a single set and others added
  58.           only a few  drive  type  entries  beyond  what  was  already
  59.           defined.  Being  a  hacker  at heart,  I decided if you want
  60.           something done,  you might as well do it  yourself.  I  then
  61.           began   work  in  ernest  on  what  I  call  Extended  Drive
  62.           Description Tables or EDDT.
  63.  
  64.           I  purchased  the  IBM  AT  Technical  Reference  and  began
  65.           studying the BIOS source code listings. It soon became clear
  66.           that  it was not difficult to do what I wanted.  During POST
  67.           the BIOS searches absolute addresses E0000 through EFFFF  in
  68.           sixty  four kilobyte blocks for a valid system board rom.  A
  69.           valid rom is define as follows:
  70.  
  71.                          BYTE 0-1 55 AA
  72.                          BYTE 2   NOT DEFINED
  73.                          BYTE 3   ENTRY POINT FOR A FAR CALL
  74.  
  75.           If the 55AA is located, a checksum is calculated, and, if it
  76.           is correct, a call is done to the entry point.  At this time
  77.           the  add  on rom is in control and may initialize itself.  A
  78.           closer look at the BIOS listings shows that the add  on  rom
  79.           code is called right after the fixed drives are initialized.
  80.           This  was  both  good  news  and bad news.  It was good news
  81.           because all the BIOS functions of the fixed  disk  interrupt
  82.           (interrupt 13H) would be available, but the bad news was the
  83.           BIOS  had already attempted to initialize the hard drive for
  84.           which it may have an inaccurate description, and get errors.
  85.  
  86.           My next problem was where do I  get  a  setup  program  that
  87.           describes any new drive types I put in my roms?  You guessed
  88.           it - do it  yourself  time  again.  I  discovered  that  the
  89.           original  AT's  used CMOS byte 12H to contain the drive type
  90.           for both drive zero and drive one, using four bits for each.
  91.           When the number of drive types was  expanded,  if  a  F  was
  92.           stored  for  a  drive  type,  it  indicated that this was an
  93.           extended drive type.  Extended drive types  were  stored  in
  94.           CMOS  bytes  19H and 1AH.  this allowed for a maximum of 255
  95.           different drive types to be defined.
  96.  
  97.           Closer  examination  of  the  BIOS listings revealed that if
  98.           CMOS byte 12H was non-zero,  the POST routine  would  invoke
  99.           the fixed disk initialization routines. These routines would
  100.           initialize  the  interrupt  vectors,  making the services of
  101.           interrupt 13H available,  and if the drive  type  for  drive
  102.           zero  was zero,  no initialization of the fixed drives would
  103.           be attempted. My setup program would the store a 01H in byte
  104.           12H and the EDDT drive types in bytes 19H and 1AH.
  105.  
  106.           HANGE FOR EDDTV400
  107.  
  108.           After  testing  on  AWARD BIOS Version 2.09 and PHOENIX BIOS
  109.           version 3.03 showed  that  they  failed  to  initialize  the
  110.           Interrupt 13H vectors for hard disk support if Fixed Drive 0
  111.           was a 0 in CMOS,  a change was made in the way the types are
  112.           setup.  A dummy drive type is needed for these  BIOS's.  The
  113.           dummy  type is chosen by ESETUP40 according to the following
  114.           rules:
  115.  
  116.                IN ORDER TO INITIALIZE INTERRUPT 13H ON  SOME
  117.                AT  COMPATIBLES FIXED DRIVE 0 MUST BE DEFINED
  118.                IN CMOS.  SINCE THE ACTUAL DRIVE MAY NOT HAVE
  119.                A  CORRESPONDING  IBM DRIVE TYPE WE MUST PICK
  120.                ONE THAT MEETS THE FOLLOWING CRITERIA:
  121.  
  122.                (1) THE TYPE DEFINED MUST HAVE LESS  THAT  OR
  123.                    EQUAL  TO  THE PHYSICAL DRIVE'S NUMBER OF
  124.                    HEADS _AND_ NUMBER OF CYLINDERS.
  125.  
  126.                (2) IF THE PHYSICAL DRIVE  HAS  MORE  THAN  8
  127.                    HEADS  THE  TYPE USED MUST HAVE A CONTROL
  128.                    BYTE VALUE OF 08H  OR  IT  MUST  NOT  USE
  129.                    WRITE PRECOMPENSATION.
  130.  
  131.           For a drive of 8 or less heads the dummy type is  1,  for  a 
  132.           drive of more than 8 heads the dummy type is 6. EDDTV400 has 
  133.           been  tested  successfully  with  the above mentioned BIOS's 
  134.           after this change was implemented.  
  135.  
  136.           When the EDDT add on rom code got control,  it could look up 
  137.           the drive types in it's internal table,  issue the set drive 
  138.           characteristics interrupt 13H  function  and  then  run  the 
  139.           diagnostics  on  the fixed drives.  As long as I was running 
  140.           diagnostics I decided to output some information about  what 
  141.           was  being  tested and the status codes returned.  I dislike 
  142.           the standard IBM error code that doesn't tell  you  anything 
  143.           about  what  failed  so  displayed is the BIOS interrupt 13H 
  144.           function code,  a description of the service  requested  and 
  145.           the  return code.  If the return code is non-zero the system 
  146.           pauses until you press a key to continue so you may  make  a 
  147.           note of the error information provided.  the diagnostics are 
  148.           similar to, but more extensive than those in the IBM POST.  
  149.  
  150.           So far I have made over 140 drive type entries, and provided 
  151.           a macro to allow for easy expansion of the table.  To add  a 
  152.           drive type just code an additional EDDT macro and reassemble 
  153.           the EDDTV400 rom module and the ESETUP40.EXE setup program.  
  154.  
  155.           To install EDDTV400 perform the following steps:
  156.  
  157.                 (1) Assemble EDDTV400 and ESETUP40
  158.  
  159.                 (2) Link EDDTV400 and ESETUP40
  160.  
  161.                 (3) Use EXE2BIN to produce EDDTV400.BIN
  162.  
  163.                 (4) Next use the software provided with most Eprom
  164.                     burners to checksum EDDTV400.BIN and split it in
  165.                     to odd and even bytes.
  166.  
  167.                 (5) Program the odd and even bytes into 2 27256
  168.                     Eproms.
  169.  
  170.                 (6) Insert the Eproms into the empty sockets on the
  171.                     system board
  172.  
  173.           I   am   including   here   two   files,   EDDTV400.EVN  and
  174.           EDDTV400.ODD.  These  contain  the code required for the odd 
  175.           and even files for the system as  coded  with  the  included 
  176.           tables.  You can just burn the EPROMS and install them. Pick 
  177.           your drive type out of the table and run ESETUP40.  
  178.  
  179.           Here are some common questions and answers.
  180.  
  181.  
  182.                   EDDTV400 - Extended Drive Description Tables
  183.  
  184.           WHAT IS EDDTV400 ?
  185.  
  186.           EDDTV400  is  a  system  to allow many more hard drive types 
  187.           than contained in the IBM AT rom set.  Currently  about  120 
  188.           different  drive  types are defined.  This covers every hard 
  189.           drive for which I have the data.  
  190.  
  191.           HOW  IS  EDDTV400  DIFFERENT   FROM   SPEEDSTOR,   VFEATURE, 
  192.           DISKMANAGER, ETC. ?  
  193.  
  194.           The  packages  mentioned  are SOFTWARE device drivers.  They 
  195.           must be loaded into RAM when you boot your system. They must 
  196.           reside on the fixed disk or diskette you boot from. The main 
  197.           portion of EDDTV400 resides in ROM.  EDDTV400 is active even 
  198.           when you boot from a floppy.  There is  no  software  device 
  199.           driver.  
  200.  
  201.           WILL EDDTV400 PARTITION MY LARGE HARD DRIVE ?  
  202.  
  203.           No,  but  with EDDTV400 and DOS 3.30's built-in partitioning 
  204.           feature,  you can partition large drives with no  additional 
  205.           software.  
  206.  
  207.           HOW DO I INSTALL EDDTV400 ?  
  208.  
  209.           First you assemble the source code for EDDTV400, then, using 
  210.           an EPROM burner and associated software,  burn the code into 
  211.           two 27256 (200ns reccommended).  These go into the two empty 
  212.           sockets on the IBM AT motherboard.  Next boot from a  floppy 
  213.           and  run  EDSETUP3 and define your hard drive types from the 
  214.           EDDTV400 list of drive types.  Now re-boot and  run  FORMAT, 
  215.           FDISK, etc. just like any hard drive you are installing.  
  216.  
  217.           DOES EDDTV400 REPLACE THE IBM BIOS ROUTINES ?  
  218.  
  219.           No,  EDDTV400  just initializes the hard drive table pointer 
  220.           interrupt vectors to point to his tables.  He  does  do  the 
  221.           diagnostics  like  the IBM BIOS,  but he tells you what he's 
  222.           doing,  and displays the actual  status  codes  received  to 
  223.           assist in diagnosing a drive/controller problem.  
  224.  
  225.           IS EDDTV400 COMPATIBLE WITH CLONES ?  
  226.  
  227.           If  they are really compatible,  it should be.  EDDTV400 was 
  228.           tested on an IBM AT 339 with the 11/15/85 BIOS installed. An 
  229.           examination of the source listings of  the  other  IBM  BIOS 
  230.           releases  doesn't reveal any incompatibilities,  but I could 
  231.           only test with what I had.  Additional testing  for  Version 
  232.           4.00  indicates  compatibility  with  AWARD 2.09 and PHOENIX 
  233.           3.03.  
  234.  
  235.           WHAT DID YOU HAVE ?  
  236.  
  237.           I have an IBM AT 339, Miniscribe 6053, and CMI CM-6426.  The 
  238.           Miniscribe is a 40MB drive and the CMI is a 20MB.  
  239.  
  240.           WILL EDDTV400 HURT MY DRIVE ?  
  241.  
  242.           I don't think so,  but,  like all  free  software  and  most 
  243.           commercial products, there is no warranty.  
  244.  
  245.           IS EDDTV400 PUBLIC DOMAIN ?  
  246.  
  247.           No,  EDDTV400  is  NOT  public  domain.  I  have  included a 
  248.           COPYRIGHT notice to protect my work.  You may  use  EDDTV400 
  249.           but DO NOT SELL IT. I doubt if there is any money to be made 
  250.           with this,  but if there is, I want it.  I put many hours in 
  251.           writing the code and don't want to lose too much control.  
  252.  
  253.           WHAT DO I NEED TO ASSEMBLE EDDTV400?  
  254.  
  255.           I used the Microsoft Macro Assembler  Version  5.00.  A  few 
  256.           version specific directives were used.  
  257.  
  258.           WHERE DO I GET HELP ??  
  259.  
  260.           If  you call me (601 992 0577) at a decent hour (7pm to 11pm 
  261.           CST) I'll try and answer questions. NO WARRANTY is provided.  
  262.           I would like to know of problems however, and if I have time 
  263.           I'll try and fix any problems IF I HAVE TIME!  
  264.  
  265.           WILL YOU BURN THE EPROMS FOR ME?  
  266.  
  267.           If you make it worth my while.  I am not a company. I do not 
  268.           keep  vast  quantities  of  eproms  on  hand.  I'd  probably 
  269.           consider  it  for  $75.00  or so.  I would have to order the 
  270.           eproms and the burn them.  I would do this but  NO  WARRANTY 
  271.           would be provided. I'm a hobbyist (the good kind of hacker).  
  272.           I'm making this available AT NO COST.  If it doesn't work in 
  273.           your system I can't be held liable.  
  274.  
  275.                                   Happy Hacking 
  276.  
  277.                                    Don  Gentry
  278.                                 (601  992  0577) 
  279.                               183 Bellegrove Circle 
  280.                                 Brandon, MS 39042 
  281. 
  282.